import request from '@/utils/request'

export function getRoleByRoleModuleId(page,id) {
    return request({
        url: '/role/getRoleByRoleModuleId/'+id+'/'+page.pageNo+'/'+page.pageSize,
        method: 'get',
    })
}

export function saveRole(data) {
    return request({
        url: '/role/saveRole',
        method: 'post',
        data
    })
}

export function updateRole(data) {
    return request({
        url: '/role/updateRole',
        method: 'put',
        data
    })
}

export function freezeRole(id,status) {
    return request({
        url: '/role/freezeRole/'+id+'/'+status,
        method: 'put',
    })
}

export function deleteRole(id) {
    return request({
        url: '/role/deleteRole/'+id,
        method: 'delete',
    })
}
